<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ page import="com.control.CommentControl" %>
<%@ page import="com.model.Comment" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>
<%
request.setCharacterEncoding("utf-8");
String comment=request.getParameter("comment");
int stu_id=(Integer)session.getAttribute("user_id");
Comment com=new Comment();
CommentControl pc=new CommentControl();
com.setStu_id(stu_id);
com.setComment_content(comment);
//System.out.print(comment);
if(pc.insertComment(com))
{
	%>
	<script>
	if(window.confirm("提意成功,是否继续提意！"))
		window.location.href="publish_comment.jsp";
	else
		window.location.href="comment_show.jsp"
	</script>
	<%}else{ %>
	<script>
	alert("提意失败！");
	window.location.href="comment_show.jsp"
	</script>
	<%} %>
</body>
</html>